package com.yst.feign1;

import com.yst.feign1.feign.TestFeign;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @Description EnableDiscoveryClient:开启服务发现支持;EnableFeignClients:开启扫描spring cloud feign客户端的功能
 * @Date 2020/3/26 21:22
 * @Param
 * @return
 **/
@EnableFeignClients
@SpringBootApplication
public class Feign1Application {

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext app = SpringApplication.run(Feign1Application.class, args);
        TestFeign bean = app.getBean(TestFeign.class);
        System.out.println(bean.getClass().getName());
    }
}